package de.dhbw.karlsruhe.picsim.model.actions.impl;

import de.dhbw.karlsruhe.picsim.model.actions.ModifyProgramCounterAction;
import de.dhbw.karlsruhe.picsim.util.Bits;
import de.dhbw.karlsruhe.picsim.util.impl.BitUtilities;
import org.jetbrains.annotations.NotNull;

/**
 * Created by IntelliJ IDEA.
 * User: goesen
 * Date: Apr 13, 2010
 * Time: 12:17:07 AM
 */
final class ModifyProgramCounterActionImpl implements ModifyProgramCounterAction {
    private final Bits bitSet;

    ModifyProgramCounterActionImpl() {
        bitSet = BitUtilities.asMostSignificantBitFirst(0, 0);
    }

    ModifyProgramCounterActionImpl(@NotNull final Bits bitSet) {
        this.bitSet = bitSet;
    }

    @NotNull
    @Override
    public Bits getLowBits() {
        return bitSet;
    }

    @Override
    public void acceptVisitor(@NotNull final Visitor visitor) {
        visitor.visit(this);
    }
}
